/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Actors;

import ElementsProperties.Killable;
import ElementsProperties.Explodable;
import EnigmaUtils.ImageLoader;

/**
 *
 * @author Snowangelic
 */
public class KillerBall extends BouncableActor implements Explodable {
    public KillerBall(){
        super();
        xPos=384;
        yPos=64;
        oldX=384;
        oldY=64;
        dy=300;
        dx=-300;
        friction=1;
        image=ImageLoader.loadImage("./images/redBall.png");
    }

    public void collidesWith(Actor actor){
        if(actor instanceof Killable){
            Killable killed=(Killable) actor;
            killed.killed();
        }
    }

    protected double[] getImpulse(){
        friction=1;
        double[] impulse=new double[2];
        impulse[0]=0;
        impulse[1]=0;
        return impulse;
    }

    public void explode() {
        died();
    }
}
